<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%--<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>门禁管理系统</title>
<style>*{margin-left:0px;margin-top: 0px}</style>
</head>
<frameset border="0" >
		<frame src="head" name="head">
	<frame src="left" name="left">
	<frame src="right" name="right">
</frameset>
</html>--%>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>门禁管理系统</title>
	<link rel="stylesheet" href="/static/frame/layui/css/layui.css">
	<link rel="stylesheet" href="/static/frame/static/css/style.css">
	<link rel="icon" href="/static/frame/static/image/code.png">
	<script src="${pageContext.request.contextPath}/static/jquery/jquery-3.1.1.js"></script>
</head>
<body>

<!-- layout admin -->
<div class="layui-layout layui-layout-admin"> <!-- 添加skin-1类可手动修改主题为纯白，添加skin-2类可手动修改主题为蓝白 -->
	<!-- header -->
	<div class="layui-header my-header">
			<!--<img class="my-header-logo" src="" alt="logo">-->
			<div class="my-header-logo">门禁权限系统</div>
		<div class="my-header-btn">
			<button class="layui-btn layui-btn-small btn-nav">收起/打开 菜单栏</button>
		</div>

		<!-- 顶部左侧添加选项卡监听 -->
		<ul class="layui-nav" lay-filter="side-top-left">
			<!--<li class="layui-nav-item"><a href="javascript:;" href-url="demo/btn.html"><i class="layui-icon">&#xe621;</i>按钮</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;"><i class="layui-icon">&#xe621;</i>基础</a>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:;" href-url="demo/btn.html"><i class="layui-icon">&#xe621;</i>按钮</a></dd>
                    <dd><a href="javascript:;" href-url="demo/form.html"><i class="layui-icon">&#xe621;</i>表单</a></dd>
                </dl>
            </li>-->
		</ul>

		<!-- 顶部右侧添加选项卡监听 -->
		<ul class="layui-nav my-header-user-nav" lay-filter="side-top-right">
			<li class="layui-nav-item">
				<a class="name" href="javascript:;"><i class="layui-icon">&#xe629;</i>主题</a>
				<dl class="layui-nav-child">
					<dd data-skin="0"><a href="javascript:;">默认</a></dd>
					<dd data-skin="1"><a href="javascript:;">纯白</a></dd>
					<dd data-skin="2"><a href="javascript:;">蓝白</a></dd>
				</dl>
			</li>
			<li class="layui-nav-item">
				<a class="name" href="javascript:;">${admin.admin_name} </a>
				<dl class="layui-nav-child">
					<dd><a href="/" onclick="clquite(this)"><i class="layui-icon">&#x1006;</i>退出</a></dd>
				</dl>
			</li>
		</ul>

	</div>
	<!-- side -->
	<div class="layui-side my-side">
		<div class="layui-side-scroll">
			<!-- 左侧主菜单添加选项卡监听 -->
			<ul class="layui-nav layui-nav-tree" lay-filter="side-main">
				<li id="adminMenu" style="display: none" class="layui-nav-item">
					<a href="javascript:;"><i class="layui-icon">&#xe620;</i>管理员管理</a>
					<dl class="layui-nav-child">
						<dd><a href="javascript:;" href-url="admin_index"><i class="layui-icon">&#xe621;</i>管理员列表</a></dd>
						<dd><a href="javascript:;" href-url="adminAdd"><i class="layui-icon">&#xe621;</i>管理员添加</a></dd>
					</dl>
				</li>
				<li id="characterMenu" style="display: none" class="layui-nav-item">
					<a href="javascript:;"><i class="layui-icon">&#xe620;</i>角色管理</a>
					<dl class="layui-nav-child">
						<dd><a href="javascript:;" href-url="roleManagement"><i class="layui-icon">&#xe621;</i>角色列表</a></dd>
						<dd><a href="javascript:;" href-url="addrole"><i class="layui-icon">&#xe621;</i>角色添加</a></dd>
					</dl>
				</li>
				<li id="hostMenu" style="display: none" class="layui-nav-item">
					<a href="javascript:;"><i class="layui-icon">&#xe620;</i>业主管理</a>
					<dl class="layui-nav-child">
						<dd><a href="javascript:;" href-url="host"><i class="layui-icon">&#xe621;</i>业主列表</a></dd>
						<dd><a href="javascript:;" href-url="hostAdd"><i class="layui-icon">&#xe621;</i>业主添加</a></dd>
					</dl>
				</li>
                <li id="userMenu" style="display: none" class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe620;</i>用户管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" href-url="user"><i class="layui-icon">&#xe621;</i>用户列表</a></dd>

                    </dl>
                </li>
				<li id="noticeMenu" style="display: none" class="layui-nav-item">
					<a href="javascript:;"><i class="layui-icon">&#xe620;</i>公告管理</a>
					<dl class="layui-nav-child">
						<dd><a href="javascript:;" href-url="notice"><i class="layui-icon">&#xe621;</i>公告列表</a></dd>
						<dd><a href="javascript:;" href-url="noticeAdd"><i class="layui-icon">&#xe621;</i>公告添加</a></dd>
					</dl>
				</li>
                <li id="repairMenu" style="display: none" class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe620;</i>报修管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" href-url="repair"><i class="layui-icon">&#xe621;</i>报修列表</a></dd>
                        <dd><a href="javascript:;" href-url="repairAdd"><i class="layui-icon">&#xe621;</i>报修添加</a></dd>
						<dd><a href="javascript:;" href-url="repairall"><i class="layui-icon">&#xe621;</i>历史报修记录</a></dd>
                    </dl>
                </li>
				<li id="pictureMenu" style="display: none" class="layui-nav-item">
					<a href="javascript:;"><i class="layui-icon">&#xe620;</i>轮播图管理</a>
					<dl class="layui-nav-child">
						<dd><a href="javascript:;" href-url="pictureList"><i class="layui-icon">&#xe621;</i>轮播图列表</a></dd>
					</dl>
				</li>
				<li id="visitorMenu" style="display: none" class="layui-nav-item">
					<a href="javascript:;"><i class="layui-icon">&#xe620;</i>访客管理</a>
					<dl class="layui-nav-child">
						<dd><a href="javascript:;" href-url="visitor"><i class="layui-icon">&#xe621;</i>访客列表</a></dd>
						<dd><a href="javascript:;" href-url="visitorAdd"><i class="layui-icon">&#xe621;</i>访客添加</a></dd>
                        <dd><a href="javascript:;" href-url="visitorAll"><i class="layui-icon">&#xe621;</i>全部访客列表</a></dd>
					</dl>
				</li>
                <li id="opinionMenu" style="display: none" class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe620;</i>用户意见处理</a>
					<dl class="layui-nav-child">
						<dd><a href="javascript:;"  href-url="opinion"><i class="layui-icon">&#xe621;</i>用户意见列表</a></dd>
						<dd><a href="javascript:;"  href-url="opinionAll"><i class="layui-icon">&#xe621;</i>历史用户意见列表</a></dd>
					</dl>
                </li>
				<li id="recordMenu" class="layui-nav-item">
					<a href="javascript:;" href-url="record"><i class="layui-icon">&#xe628;</i>历史记录查询</a>
				</li>
				</ul>

		</div>
	</div>
	<!-- body -->
	<div class="layui-body my-body">
		<div class="layui-tab layui-tab-card my-tab" lay-filter="card" lay-allowClose="true">
			<ul class="layui-tab-title">
				<li class="layui-this" lay-id="1"><span><i class="layui-icon">&#xe638;</i>欢迎页</span></li>
			</ul>
			<div class="layui-tab-content">
				<div class="layui-tab-item layui-show">
					<iframe id="iframe" src="right" frameborder="0"></iframe>
				</div>
			</div>
		</div>
	</div>
	<!-- footer -->
	<div class="layui-footer my-footer">

	</div>
</div>


<!-- 右键菜单 -->
<div class="my-dblclick-box none">
	<table class="layui-tab dblclick-tab">
		<tr class="card-refresh">
			<td><i class="layui-icon">&#x1002;</i>刷新当前标签</td>
		</tr>
		<tr class="card-close">
			<td><i class="layui-icon">&#x1006;</i>关闭当前标签</td>
		</tr>
		<tr class="card-close-all">
			<td><i class="layui-icon">&#x1006;</i>关闭所有标签</td>
		</tr>
	</table>
</div>

<script type="text/javascript" src="/static/frame/layui/layui.js"></script>
<script type="text/javascript" src="/static/frame/static/js/vip_comm.js"></script>
<script>
    var menuList="${sessionScope.mainMenus}";
    if((menuList.search("管理员管理"))!=-1){
        document.getElementById("adminMenu").style.display="block";
	}
    if((menuList.search("角色管理"))!=-1){
        document.getElementById("characterMenu").style.display="block";
    }
    if((menuList.search("业主管理"))!=-1){
        document.getElementById("hostMenu").style.display="block";
    }
    if((menuList.search("用户管理"))!=-1){
        document.getElementById("userMenu").style.display="block";
    }
    if((menuList.search("公告管理"))!=-1){
        document.getElementById("noticeMenu").style.display="block";
    }
    if((menuList.search("报修管理"))!=-1){
        document.getElementById("repairMenu").style.display="block";
    }
    if((menuList.search("用户意见处理"))!=-1){
        document.getElementById("opinionMenu").style.display="block";
    }
    if((menuList.search("轮播图管理"))!=-1){
        document.getElementById("pictureMenu").style.display="block";
    }
    if((menuList.search("访客管理"))!=-1){
        document.getElementById("visitorMenu").style.display="block";
    }

    function clquite(e){
        window.location.href="${pageContext.request.contextPath}/clearAllSession";
	}
    window.onbeforeunload=function(){
        $.ajax({
            url:"${pageContext.request.contextPath}/destroyLogin.do",
            async:false
        });
	}
</script>
</body>
</html>
